package sevensoft.创建型模式.单例模式.饿汉式;

public class Singleton2 {
    private Singleton2(){}

    private static final Singleton2 singleton;

    static {
        singleton=new Singleton2();
    }

    public static Singleton2 getInstance(){
        return singleton;
    }
}
